//
//  recordViewController.h
//  MoneyLog
//
//  Created by Max on 11-5-8.
//  Copyright 2011年 wicresoft. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Database.h"
#import "Protocol.h"

@class dbAccess;
@class RecordWrapper;
@class KindWrapper;
@class KindManagerViewController;
@class RemarkViewController;

//section
enum {
	kBasicSection = 0,
	kExtendSection,
};

//row
enum {
    kMoneyRow = 0,
	kKindRow,
    kDateTimeRow,
    kAccountRow,
	kRemarkRow,
    kMoneyKindRow,
    kSubKineRow,
}BasicRow;

enum {
    kImageRow = 0,
    kLocationRow,
    kRecordingRow,
}ExtendRow;


enum ViewControllerTag {
    kKindViewController = 0,
    kDateTimeViewController,
    kRemarkViewController,
};

enum PickerView {
    kAccountPickerView=0,
};

@interface RecordViewController : UITableViewController<MyViewDelegate,UITextFieldDelegate,UIActionSheetDelegate,UIPickerViewDelegate,UIPickerViewDataSource> {
    NSString                    *titleString;
    RecordWrapper               *record;                                //记录对象      
    KindWrapper                 *kind;
    
    UITextField                 *moneyText;
    
    NSInteger                   viewMode;                               //0:新增，1：编辑
    KindManagerViewController   *kindManagerController;
    
    RemarkViewController        *remarkController;
    
    UIActionSheet               *actionSheet;
    NSMutableArray              *pickerDataSource;
    UIPickerView                *accoutPickerView;
}

@property (nonatomic,retain) NSString       *titleString;
@property (nonatomic,retain) RecordWrapper  *record;
@property (nonatomic,retain) KindWrapper    *kind;
@property (assign)           NSInteger      viewMode;
@property (nonatomic,retain) KindManagerViewController   *kindManagerController;
@property (nonatomic,retain) RemarkViewController        *remarkController;

@property (nonatomic,retain) UIActionSheet  *actionSheet;
@property (nonatomic,retain) NSMutableArray *pickerDataSource;
@property (nonatomic,retain) UIPickerView   *accoutPickerView;

+ (NSString *)titleForSection:(NSInteger)section; 

@end
